Integrand size = 38, antiderivative size = 35 \[ \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=(b B+a C) x+\frac {a B \text {arctanh}(\sin (c+d x))}{d}+\frac {b C \sin (c+d x)}{d} \]
Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.31 \[ \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=b B x+a C x+\frac {a B \text {arctanh}(\sin (c+d x))}{d}+\frac {b C \cos (d x) \sin (c)}{d}+\frac {b C \cos (c) \sin (d x)}{d} \]
b*B*x + a*C*x + (a*B*ArcTanh[Sin[c + d*x]])/d + (b*C*Cos[d*x]*Sin[c])/d + (b*C*Cos[c]*Sin[d*x])/d
Time = 0.52 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3042, 3508, 3042, 3447, 3042, 3502, 3042, 3214, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^2(c+d x) (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 3508 |
\(\displaystyle \int \sec (c+d x) (a+b \cos (c+d x)) (B+C \cos (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (B+C \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int \sec (c+d x) \left ((a C+b B) \cos (c+d x)+a B+b C \cos ^2(c+d x)\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a C+b B) \sin \left (c+d x+\frac {\pi }{2}\right )+a B+b C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \int (a B+(b B+a C) \cos (c+d x)) \sec (c+d x)dx+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a B+(b B+a C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle a B \int \sec (c+d x)dx+x (a C+b B)+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a B \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+x (a C+b B)+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {a B \text {arctanh}(\sin (c+d x))}{d}+x (a C+b B)+\frac {b C \sin (c+d x)}{d}\) |
3.8.73.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 1.82 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.37
method | result | size |
derivativedivides | \(\frac {a C \left (d x +c \right )+B a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b \sin \left (d x +c \right ) C +B b \left (d x +c \right )}{d}\) | \(48\) |
default | \(\frac {a C \left (d x +c \right )+B a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b \sin \left (d x +c \right ) C +B b \left (d x +c \right )}{d}\) | \(48\) |
parts | \(\frac {\left (B b +a C \right ) \left (d x +c \right )}{d}+\frac {B a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {b C \sin \left (d x +c \right )}{d}\) | \(50\) |
parallelrisch | \(\frac {-B a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+B a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+b \sin \left (d x +c \right ) C +\left (B b +a C \right ) x d}{d}\) | \(56\) |
risch | \(b B x +a C x -\frac {i C b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i C b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {B a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {B a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) | \(83\) |
norman | \(\frac {\left (-B b -a C \right ) x +\left (-2 B b -2 a C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (B b +a C \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (2 B b +2 a C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {2 C b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 C b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 C b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 C b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {B a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {B a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(216\) |
Time = 0.29 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.54 \[ \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {2 \, {\left (C a + B b\right )} d x + B a \log \left (\sin \left (d x + c\right ) + 1\right ) - B a \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, C b \sin \left (d x + c\right )}{2 \, d} \]
1/2*(2*(C*a + B*b)*d*x + B*a*log(sin(d*x + c) + 1) - B*a*log(-sin(d*x + c) + 1) + 2*C*b*sin(d*x + c))/d
\[ \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\int \left (B + C \cos {\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx \]
Time = 0.22 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.66 \[ \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {2 \, {\left (d x + c\right )} C a + 2 \, {\left (d x + c\right )} B b + B a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, C b \sin \left (d x + c\right )}{2 \, d} \]
1/2*(2*(d*x + c)*C*a + 2*(d*x + c)*B*b + B*a*(log(sin(d*x + c) + 1) - log( sin(d*x + c) - 1)) + 2*C*b*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 79 vs. \(2 (35) = 70\).
Time = 0.34 (sec) , antiderivative size = 79, normalized size of antiderivative = 2.26 \[ \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {B a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - B a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (C a + B b\right )} {\left (d x + c\right )} + \frac {2 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]
(B*a*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - B*a*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + (C*a + B*b)*(d*x + c) + 2*C*b*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1))/d
Time = 1.83 (sec) , antiderivative size = 100, normalized size of antiderivative = 2.86 \[ \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {C\,b\,\sin \left (c+d\,x\right )}{d}+\frac {2\,B\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]